package cn.szzsi.common.model;

import cn.szzsi.common.kit.CommonUtil;
import cn.szzsi.common.model.base.BaseCustomerAllowance;

import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by zhengy on 2017/2/21.
 */
//@TableBind(tableName = "b_customer_allowance",pkName = "id")
public class CustomerAllowance extends BaseCustomerAllowance<CustomerAllowance> {
    public static final CustomerAllowance dao=new CustomerAllowance().dao();

    public static void saveInfo(String mid, BigDecimal totalIncome, BigDecimal profit, Integer status, Integer memberLevel, String orderSn, String uid){
        CustomerAllowance allowance=new CustomerAllowance();
        allowance.set("id", CommonUtil.getUUID());
        allowance.set("mid",mid);
        allowance.set("totalIncome",totalIncome);
        allowance.set("profit",profit);
        allowance.set("status",status);
        allowance.set("dataLevel",memberLevel);
        allowance.set("createDate",new Date());
        allowance.set("uid",uid);
        allowance.set("orderSn",orderSn);
        allowance.save();

    }

}
